<template>
  <common_print_dialog ref="common_print_dialog" businessType="PRE_BIN"   v-bind="$attrs" v-on="$listeners" :tableModel="[
    { key: 'binNo', label: 'label_box_code', 'min-width': 140, 'show-overflow-tooltip': true, },
    { key: 'targetWarehouse', label: 'label_destination_warehouse', 'width': 120, 'show-overflow-tooltip': true, },
    { key: 'skuCategoryNum', label: 'label_sku_kind', 'width': 100,'show-overflow-tooltip': true,  },
    { key: 'skuCount', label: 'label_sku_count_sum', 'width': 100,'show-overflow-tooltip': true,  },
  ]" :printUrl="$url['print/box/print']" :printHandler="(data, list) => {

  return {
    clientName: data.clientName,
    printDetailList: list.map(it => {
      return {
        printType: data.type,
        templateId: data.templateId,
        printNum: data.printNumSum,
        fileType: data.fileType,
        binNo: it.binNo,
      }
    })
  }
}" :previewUrl="$url['print/box/preview']" :previewHandler="(data, row) => {
  data.binNo = row.binNo;
  data.printNum = data.printNumSum;
  data.printType = data.type;
  return data
}" />
</template>

<script>
import common_print_dialog from './common_print_dialog.vue'

export default {
  components: { common_print_dialog },
  data() {
    return {

    }
  },
  props: {



  },
  methods: {

    show(rows) {
      this.$refs.common_print_dialog.show(rows)
    },



  }
}
</script>
